package com.accenture.adf.newcodington.module9.sample;

/**
 * 
 * LaserShow is about a special show in the New Codington Museum
 * 
 * Topic: Try-it on usage of parameterized constructor and local variables
 * 
 * Instructions:
 * 1. Use 'LaserShow_TryIt2' as the starting point and make the following changes
 * 2. Change the class name to 'LaserShow_TryIt3'
 * 		a. Change all the references of 'LaserShow_TryIt2' to 'LaserShow_TryIt3' (for example constructors)
 * 3. Declare a private String variable for name of the show between class declaration and main() method
 * 4. on next line, declare a private double variable for duration of the show
 * 5. On next line, declare a private integer variable for no of seats for the show
 * 6. On next line, declare a boolean variable for goggles required flag
 * 7. Create a parameterized constructor taking name, duration, number of seats and goggles required as 
 *    parameters after default constructor
 * 8. Assign values of parameters to the respective instance variables inside parameterized constructor
 * 9. Print "Parameterized constructor invoked" to console from parameterized constructor
 * 10. Modify main() method to create at least two instances of 'LaserShow_TryIt3' using the parameterized
 *    constructor with appropriate arguments based on data type
 * 11. Print all values of the instance variables using newly created 'LaserShow_TryIt3' instances
 * 
 */


public class LaserShow_TryIt3 {
	
	//Static fields
	private static final String showType;
	private static final String showName;
	
	// Try-it 3 - Instance variables
	private String name;
	private double duration;
	private int noOfSeats;
	private boolean gogglesRequried;
	// end Try-it 3

	static{
		showType = "Animated";
		showName = "LaserShow";
		System.out.println("Static block initialiazed.");
	}
	
	public static void main(String[] args){		
		System.out.println("Show Type: " + showType);
		System.out.println("Show Name: " + showName);
		
		// Try-it 3 - laserShow - is a local variable
		LaserShow_TryIt3 laserShow1 = new LaserShow_TryIt3("Planets", 2.5, 20, true);
		
		System.out.println();
		System.out.println("Show Name: "+ laserShow1.name);
		System.out.println("Show Duration: "+ laserShow1.duration);		
		System.out.println("Show seating capacity: "+ laserShow1.noOfSeats);
		System.out.println("Goggles Required: "+ laserShow1.gogglesRequried);
		
		LaserShow_TryIt3 laserShow2 = new LaserShow_TryIt3("Dark Side of the Moon", 2.0, 60, false);
		
		System.out.println();
		System.out.println("Show Name: "+ laserShow2.name);
		System.out.println("Show Duration: "+ laserShow2.duration);		
		System.out.println("Show seating capacity: "+ laserShow2.noOfSeats);
		System.out.println("Goggles Required: "+ laserShow2.gogglesRequried);
		// end Try-it 3
	}
	
	//Generic constructor
	public LaserShow_TryIt3() {
		System.out.println("Default constructor invoked.");
	}
	
	// Try-it 3 - Parameterized constructor
	public LaserShow_TryIt3(String name, double duration, int noOfSeats,	boolean gogglesRequried) {
		this.name = name;
		this.duration = duration;
		this.noOfSeats = noOfSeats;
		this.gogglesRequried = gogglesRequried;
		
		System.out.println("\nParameterized constructor invoked.");
		// end Try-it 3
		
	}
	
	
}
